package com.xy.smartsms.db.carrierparam.entity;

import android.content.ContentValues;

/**
 * Created by admin on 2016/11/24.
 */

public class WhiteListItem {
    private int id;
    private String number;
    private String name;
    private int level;
    private String extendVal;
    private int maxLen;
    private int minLen;
    private int len;

    private int isSectionNo;//号段匹配

    public static final int NO = 0;
    public static final int YES = 1;

    public static int LEVEL_NORMAL = 1;
    public static int LEVEL_HIGH = 0;

    private int status = 0;
    public static final int STATUS_LOAD_DEFULT = 0;
    public static final int STATUS_LOAD_SUC_HAS_DATA = 1;
    public static final int STATUS_LOAD_SUC_NOT_DATA = 2;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public WhiteListItem() {
    }

    public WhiteListItem(String number) {
        this.number = number;
        this.level = LEVEL_NORMAL;
    }

    public ContentValues getContentValues() {
        ContentValues values = new ContentValues();

        values.put(WhiteListDb.KEY_PHONE, this.number);
        values.put(WhiteListDb.KEY_NAME, this.name);
        values.put(WhiteListDb.KEY_LEVEL, this.level);
        values.put(WhiteListDb.KEY_EXTENDVAL, this.extendVal);
        values.put(WhiteListDb.KEY_MAX_LEN,this.maxLen);
        values.put(WhiteListDb.KEY_MIN_LEN,this.minLen);
        values.put(WhiteListDb.KEY_LEN,this.len);
        values.put(WhiteListDb.KEY_IS_SECTION_NO,this.isSectionNo);

        return values;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(" number:" + this.number);
        sb.append(" name:" + this.name);
        sb.append(" level:" + this.level);

        return sb.toString();
    }

    public int getId() {
        return id;
    }

    public int getLevel() {
        return level;
    }

    public WhiteListItem setLevel(int level) {
        this.level = level;
        return this;
    }

    public String getName() {
        return name;
    }

    public WhiteListItem setName(String name) {
        this.name = name;
        return this;
    }

    public String getNumber() {
        return number;
    }

    public WhiteListItem setNumber(String number) {
        this.number = number;
        return this;
    }

    public String getExtendVal() {
        return extendVal;
    }

    public void setExtendVal(String extendVal) {
        this.extendVal = extendVal;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getMaxLen() {
        return maxLen;
    }

    public void setMaxLen(int maxLen) {
        this.maxLen = maxLen;
    }

    public int getMinLen() {
        return minLen;
    }

    public void setMinLen(int minLen) {
        this.minLen = minLen;
    }

    public int getLen() {
        return len;
    }

    public void setLen(int len) {
        this.len = len;
    }

    public int getIsSectionNo() {
        return isSectionNo;
    }

    public void setIsSectionNo(int isSectionNo) {
        this.isSectionNo = isSectionNo;
    }
}
